<template>
  <!--供应商管理页面 -->
  <el-row>
    <el-col :span="22" :offset="1">

      <!--卡片shart-->
      <el-card class="box-card" style="padding: 0 15px;">

        <div>
          <div style="width: 80%"></div>
          <div style="padding-bottom:-20px;width:30%;float: right">
            <el-button type="primary" @click="addFun" style="width: 30%">新增</el-button>
          </div>
        </div>
        <div  style="display:inline-block; *display:inline; zoom:1;">
          <div style="margin-top: 15px;">
            <div style="float: left">
              <el-input placeholder="请输入内容" v-model="input3" class="input-with-select" size="small" style="width: 100%" >
                <el-button slot="append" icon="el-icon-search" float="left"></el-button>
              </el-input>
            </div><br/>

          </div>
          <div style="float: left">
            <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
              <!--未就诊-->
              <el-table
                :data="tableData1"
                style="width: 100%"
                :header-cell-style="{background:'#c0c0ff',color:'black','text-align':'center'}">
                <el-table-column
                  prop="id"
                  label="序号"
                  width="80">
                </el-table-column>
                <el-table-column
                  prop="guahaoid"
                  label="供应商编号"
                  width="120">
                </el-table-column>
                <el-table-column
                  prop="name"
                  label="供应商名称"
                  width="100">
                </el-table-column>
                <el-table-column
                  prop="sex"
                  label="联系人"
                  width="100">
                </el-table-column>
                <el-table-column
                  prop="age"
                  label="联系电话"
                  width="100">
                </el-table-column>
                <el-table-column
                  prop="phonenumber"
                  label="创建时间"
                  width="120">
                </el-table-column>
                <el-table-column
                  prop="keshi"
                  label="创建人员"
                  width="100">
                </el-table-column>
                <el-table-column
                  prop="doctor"
                  label="供应商状态"
                  width="100">
                </el-table-column>
                <el-table-column
                  fixed="right"
                  label="操作"
                  width="130">
                  <template slot-scope="scope">
                    <el-button @click="handleClick(scope.row)" type="text" size="medium"></el-button>
                    <el-button type="text" size="medium" @click="editFun">编辑</el-button>
                    <el-button type="text" size="medium" @click="">删除</el-button>
                  </template>
                </el-table-column>
              </el-table>
            </el-tabs>
          </div>
          <br/><br/><br/>
          <router-view/>
        </div>

      </el-card>
      <!--卡片end-->

    </el-col>
  </el-row>
</template>

<script>
  export default {
    data() {
      return {
        tableData1: [{
          id: '1',
          guahaoid: '201912090030',
          sex: '男',
          name: '王小虎',
          age: '18',
          phonenumber: '15289358501',
          keshi: '内科',
          doctor: '韩政',
          time:
            '2019-11-12 12:08:12',
          shishoumoney: '20.0',
          tuifeimoney: '20.0',
          jiuzhenzhuangtai: '未就诊',
          operty: '编辑',

        }],



        keshiOptions: [{
          keshi: '选项1',
          label: '全部'
        }, {
          keshi: '选项2',
          label: '全科'
        }, {
          keshi: '选项3',
          label: '内科'
        }, {
          keshi: '选项4',
          label: '儿科'
        }, {}],
        keshi: '',


        options: [{
          name: '选项1',
          label: '全部'
        }, {
          name: '选项2',
          label: '韩政'
        }, {
          name: '选项3',
          label: '田立杰'
        }, {}, {}],
        name: '',


        pickerOptions: {
          disabledDate(time) {
            return time.getTime() > Date.now();
          },
          shortcuts: [{
            text: '今天',
            onClick(picker) {
              picker.$emit('pick', new Date());
            }
          }, {
            text: '昨天',
            onClick(picker) {
              const date = new Date();
              date.setTime(date.getTime() - 3600 * 1000 * 24);
              picker.$emit('pick', date);
            }
          }, {
            text: '一周前',
            onClick(picker) {
              const date = new Date();
              date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
              picker.$emit('pick', date);
            }
          }]
        },
        value1: '',
        value2: '',

        activeName: 'first'
      }
    },
    methods: {
      handleClick(tab, event) {
        console.log(tab, event);
      },
      addFun: function () {
        this.$router.push("/confSupplierInsert")
      },
      editFun: function () {
        this.$router.push("/confSupplierEdit")

      }

    },
  }


</script>

<style scoped>
  .float{
    float: left;
  }


</style>
